package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import com.qijian.common.enums.ApprovalDescriptionEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.Date;

/**
 * 工艺变更对象 main_line_change
 *
 * @author qijian
 * @date 2022-02-23
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("main_line_change")
public class LineChange extends BaseEntity{
    private static final long serialVersionUID = 1L;

    /** ID */
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "ID")
    private Long id;

    /** 流程ID */
    @Excel(name = "编号")
    @ApiModelProperty(value = "编号")
    private String code;

    /** 流程ID */
    @Excel(name = "流程ID")
    @ApiModelProperty(value = "流程ID")
    private String processInstanceId;

    /** BOM */
    @Excel(name = "BOM")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "BOM")
    private Long bomId;

    /** BOM名称 */
    @Excel(name = "BOM名称")
    @ApiModelProperty(value = "BOM名称")
    private String bomName;

    /** 申请人 */
    @Excel(name = "申请人")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "申请人")
    private Long userId;

    /** 所属部门 */
    @Excel(name = "所属部门")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "所属部门")
    private Long deptId;

    /** 审核者 */
    @Excel(name = "审核者")
    @ApiModelProperty(value = "审核者")
    private String approvalBy;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "审核时间")
    private Date approvalTime;

    /** 审核状态 */
    @Excel(name = "审核状态")
    @ApiModelProperty(value = "审核状态")
    private ApprovalDescriptionEnum approvalStatus;

    /** 是否执行 */
    @Excel(name = "是否执行")
    @ApiModelProperty(value = "是否执行")
    private Boolean isExec;

    /** 备注 */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

}
